import request from "@/utils/http";
import { useUserStore } from "@/store/user";
const userStore = useUserStore();


/**
 * @description: 企业账号验证
 * @param {*} data.loginaccount 企业账号
 * @param {*} data.loginpassword 企业密码
 */
export const validateEnterpriseAccountApi = (data) => {
  return request.post("/member/enterprise_validation", {
    ...data,
    uid: userStore.userInfo.id,
  });
}

/**
 * @description: 我的体检列表
 * @param {*} data.status 状态 0-无效，1-未预约，2已预约为体检，3-已体检，99-作废
 */
export const getMyExaminationApi = (data) => {
  return request.post("/member/mycheckuplist", data);
}

export const getMyExaminationDetailApi = (data) => {
  return request.post('/member/getmyinfo', data);
}

export const getInstitutionList = (data) => {
  return request.post('/member/getinstitutionlist', data);
}


export const addReserveApi = (data) => {
  return request.post('/member/addResvervations', data);
}
// 微信支付
export const wxPayApi = (data) => {
  return request.post('/wx/wxPay', data);
}
// 微信退款
export const wxRefundApi = (data) => {
  return request.post('/wx/refund', data);
}
// 微信退款
export const upPaymentStatus = (data) => {
  return request.post('/wx/uppaymentstatus', data);
}
// 微信退款
export const updataismarried = (data) => {
  return request.post('/member/updataismarried', data);
}